package com.db.controller;

import com.db.common.pojo.JsonResult;
import com.db.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log/")
public class SysLogController {

    @Autowired
    private SysLogService sysLogService;

    @RequestMapping("doFindPageObjects")
    public JsonResult doFindPageObjects(String username, Long pageCurrent) {
        return new JsonResult(sysLogService.findObjects(username, pageCurrent));
    }

    @RequestMapping("doDeleteById")
    public JsonResult doDeleteById(Long... id) {
        sysLogService.deleteByIds(id);
        return new JsonResult("delete ok");
    }
}
